home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 May
/
EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso
/
softwareupdate
/
system
/
amigados
/
filefunctions
/
example4.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-10-10
|
3KB
|
77 lines
/***********************************************************/
/* */
/* Amiga C Encyclopedia (ACE) Amiga C Club (ACC) */
/* -------------------------- ------------------ */
/* */
/* Manual: AmigaDOS Amiga C Club */
/* Chapter: File Functions Tulevagen 22 */
/* File: Example4.c 181 41 LIDINGO */
/* Author: Anders Bjerin SWEDEN */
/* Date: 93-03-15 */
/* Version: 1.0 */
/* */
/* Copyright 1993, Anders Bjerin - Amiga C Club (ACC) */
/* */
/* Registered members may use this program freely in their */
/* own commercial/noncommercial programs/articles. */
/* */
/***********************************************************/
/* This example demonstrates how to attach a comment to a file. */
/* The commend will be attached to a file on the Ram disk called */
/* "HighScore.dat". (Please run Example 1 in the "Files" chapter */
/* to create this file before you run this example.) Too see the */
/* comment you can use the Shell (CLI) command "List". Simply */
/* open a Shell window and type "List Ram:" (without quotations) */
/* Include the dos library definitions: */
#include <dos/dos.h>
/* Now we include the necessary function prototype files: */
#include <clib/dos_protos.h> /* General dos functions... */
#include <stdio.h> /* Std functions [printf()...] */
#include <stdlib.h> /* Std functions [exit()...] */
/* Set name and version number: */
UBYTE *version = "$VER: AmigaDOS/FileFunctions/Example4 1.0";
/* Declared our own function(s): */
/* Our main function: */
int main( int argc, char *argv[] );
/* Main function: */
int main( int argc, char *argv[] )
{
/* A simple boolean variable: */
BOOL ok;
/* Attach a short comment to the file: */
ok = SetComment( "RAM:HighScore.dat", "My high-score list!" );
/* Check if the comment was successfully attached: */
if( ok )
printf( "The comment was successfull attached to the file!\n" );
else
printf( "Could not attach the comment!\n" );
/* The End! */
exit( 0 );
}